<?php


namespace app\index\model;

use think\Db;
use think\Model;

class User extends Model
{
    public static function getOrder($where){
        try{
            $data = Db::view('user','id,nickname')
                ->view('pay_user','order_number,add_time','user.id = pay_user.user_id')
                ->view('pay_template','number_day,money','pay_user.pay_id = pay_template.id')
                ->where($where)
                ->select();
            return $data;
        }catch (Exception $e){
            return $e;
        }
    }

}